/*
 * @Description  : 
 * @Author       : 陈志祥
 * @CreateTime   : 2022-08-30 14:37:03
 * @LastEditTime : 2022-08-30 14:47:00
 * @FilePath     : /src/main/java/com/example/demo/controller/IndexController.java
 */

package com.example.demo.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

@Controller
public class IndexController {

    @GetMapping("index")//页面的url地址
    public String getindex(Model model)//对应函数
    {
        model.addAttribute("name","鹏哥");
        return "index";//与templates中index.html对应
    } 
}
